#ifndef OPENHARMONYCAMERA_H
#define OPENHARMONYCAMERA_H

#include <QObject>
#include <QtMultimedia/qcamera.h>

QT_BEGIN_NAMESPACE

class QThread;
class OPenHarmonyCameraPrivate;

struct OPenHarmonyCameraInfo
{
    QByteArray name;
    QString description;
    QCamera::Position position;
    int orientation;
};
Q_DECLARE_TYPEINFO(OPenHarmonyCameraInfo, Q_MOVABLE_TYPE);

class OPenHarmonyCamera : public QObject
{
    Q_OBJECT    

public:    
    ~OPenHarmonyCamera();

    QString cameraId() const;
    static QStringList getIdOfCameras();
    static OPenHarmonyCamera *open(const QString &cameraId);
    static void getCameraInfo(const QString &id, OPenHarmonyCameraInfo *info);

Q_SIGNALS:

private:
    OPenHarmonyCameraPrivate *d_ptr;
    QScopedPointer<QThread> m_worker;
    Q_DECLARE_PRIVATE(OPenHarmonyCamera)
    OPenHarmonyCamera(OPenHarmonyCameraPrivate *d, QThread *worker);
};

QT_END_NAMESPACE
#endif // OPENHARMONYCAMERA_H
